#ifndef DESKTOPUI_H
#define DESKTOPUI_H

#include <QtGui/QDialog>
#include <QtGui/QMenu>

#include "calendar.h"
#include "notetask.h"
#include "note.h"
#include "backupdatadialog.h"
namespace Ui {
    class desktopUI;
}

class desktopUI : public QDialog
{
    Q_OBJECT

public:
    explicit desktopUI(QWidget *parent = 0);
    ~desktopUI();

    void initPosSize(qint32 screenWidth,qint32 screenHeigh);
    void show();

    void createAction();
    void createTrayIcon();
    void createIcon();

    void readData(QString fileName);
    void saveData(QString fileName);

private Q_SLOTS:
    void update();
    void slotBackupData();
    void slotReloadData();
    void slotQuit();


private:
    NoteItemMap *   _pItemMap;//conserve datas
    Calendar *      _pCalendarUI;//calendar ui,in the center of screen
    NoteTask *      _pNoteTaskUI;//notetask ui,in the right side of screen

    QMenu *         _trayIconMenu;
    QAction *       _backupDataAction;
    QAction *       _reloadDataAction;
    QAction *       _quitAction;

    QSystemTrayIcon *_trayIcon;

private:
    Ui::desktopUI *ui;
};

#endif // DESKTOPUI_H
